<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>影视天堂 - 海量高清影视资源</title>
    <!-- 网站图标 -->
    <link rel="shortcut icon" href="{{ url_for('static', filename='images/favicon.ico') }}" type="image/x-icon">
    <link rel="icon" href="{{ url_for('static', filename='images/favicon.ico') }}" type="image/x-icon">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.socket.io/4.4.1/socket.io.min.js"></script>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">

    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#FF4D4F',
                        dark: '#1E293B',
                        light: '#F8FAFC',
                        'dark-blue': '#0F172A',
                        'gray-dark': '#334155',
                        'gray-medium': '#64748B',
                        'gray-light': '#CBD5E1'
                    },
                    fontFamily: {
                        inter: ['Inter', 'sans-serif'],
                    },
                }
            }
        }
    </script>

    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.5);
            }
            .bg-gradient-movie {
                background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
            }
            .hover-scale {
                transition: transform 0.3s ease;
            }
            .hover-scale:hover {
                transform: scale(1.05);
            }
            .backdrop-blur-sm {
                backdrop-filter: blur(4px);
            }
            .card-gradient {
                background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.8) 100%);
            }
        }
    </style>
</head>

<body class="font-inter bg-dark-blue text-light min-h-screen flex flex-col">
    <!-- 导航栏 -->
    <header class="sticky top-0 z-50 bg-dark/90 backdrop-blur-md transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <!-- Logo -->
            <a href="/" class="flex items-center space-x-2">
                <div class="w-10 h-10 rounded-lg bg-primary flex items-center justify-center">
                    <i class="fa fa-film text-2xl text-white"></i>
                </div>
                <span class="text-xl font-bold text-white">影视天堂</span>
            </a>

            <!-- 主导航 - 桌面版 -->
            <nav class="hidden md:flex items-center space-x-8">
                <a href="/" class="text-white font-medium hover:text-primary transition-colors">首页</a>
                <div class="relative group">
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors flex items-center">
                        电影 <i class="fa fa-angle-down ml-1"></i>
                    </a>
                    <div class="absolute left-0 mt-2 w-48 rounded-md shadow-lg bg-dark-blue/95 backdrop-blur-sm opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50">
                        <div class="py-1">
                            <a href="/?t1=1&t2=6" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">动作片</a>
                            <a href="/?t1=1&t2=7" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">喜剧片</a>
                            <a href="/?t1=1&t2=8" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">爱情片</a>
                            <a href="/?t1=1&t2=9" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">科幻片</a>
                            <a href="/?t1=1&t2=10" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">恐怖片</a>
                            <a href="/?t1=1&t2=11" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">剧情片</a>
                            <a href="/?t1=1&t2=12" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">战争片</a>
                            <a href="/?t1=1&t2=20" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">惊悚片</a>
                            <a href="/?t1=1&t2=21" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">家庭片</a>
                            <a href="/?t1=1&t2=22" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">古装片</a>
                            <a href="/?t1=1&t2=23" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">历史片</a>
                            <a href="/?t1=1&t2=24" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">悬疑片</a>
                            <a href="/?t1=1&t2=25" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">犯罪片</a>
                            <a href="/?t1=1&t2=26" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">灾难片</a>
                            <a href="/?t1=1&t2=27" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">纪录片</a>
                            <a href="/?t1=1&t2=28" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">短片</a>
                            <a href="/?t1=1&t2=29" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">动画片</a>
                            <a href="/?t1=1&t2=45" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">西部片</a>
                            <a href="/?t1=1&t2=5" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">伦理片</a>
                        </div>
                    </div>
                </div>
                <div class="relative group">
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors flex items-center">
                        连续剧 <i class="fa fa-angle-down ml-1"></i>
                    </a>
                    <div class="absolute left-0 mt-2 w-48 rounded-md shadow-lg bg-dark-blue/95 backdrop-blur-sm opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50">
                        <div class="py-1">
                            <a href="/?t1=2&t2=13" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">国产剧</a>
                            <a href="/?t1=2&t2=14" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">香港剧</a>
                            <a href="/?t1=2&t2=15" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">韩国剧</a>
                            <a href="/?t1=2&t2=16" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">欧美剧</a>
                            <a href="/?t1=2&t2=30" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">台湾剧</a>
                            <a href="/?t1=2&t2=31" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">日本剧</a>
                            <a href="/?t1=2&t2=32" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">海外剧</a>
                            <a href="/?t1=2&t2=33" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">泰国剧</a>
                        </div>
                    </div>
                </div>
                <div class="relative group">
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors flex items-center">
                        动漫 <i class="fa fa-angle-down ml-1"></i>
                    </a>
                    <div class="absolute left-0 mt-2 w-48 rounded-md shadow-lg bg-dark-blue/95 backdrop-blur-sm opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50">
                        <div class="py-1">
                            <a href="/?t1=4&t2=38" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">国产动漫</a>
                            <a href="/?t1=4&t2=40" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">日韩动漫</a>
                            <a href="/?t1=4&t2=39" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">欧美动漫</a>
                        </div>
                    </div>
                </div>
                <div class="relative group">
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors flex items-center">
                        综艺 <i class="fa fa-angle-down ml-1"></i>
                    </a>
                    <div class="absolute left-0 mt-2 w-48 rounded-md shadow-lg bg-dark-blue/95 backdrop-blur-sm opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50">
                        <div class="py-1">
                            <a href="/?t1=3&t2=34" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">大陆综艺</a>
                            <a href="/?t1=3&t2=35" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">港台综艺</a>
                            <a href="/?t1=3&t2=36" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">日韩综艺</a>
                            <a href="/?t1=3&t2=37" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">欧美综合</a>
                        </div>
                    </div>
                </div>
                <div class="relative group">
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors flex items-center">
                        体育 <i class="fa fa-angle-down ml-1"></i>
                    </a>
                    <div class="absolute left-0 mt-2 w-48 rounded-md shadow-lg bg-dark-blue/95 backdrop-blur-sm opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50">
                        <div class="py-1">
                            <a href="/?t1=17&t2=41" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">足球</a>
                            <a href="/?t1=17&t2=42" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">篮球</a>
                            <a href="/?t1=17&t2=18" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">NBA</a>
                        </div>
                    </div>
                </div>
                <div class="relative group">
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors flex items-center">
                        短剧 <i class="fa fa-angle-down ml-1"></i>
                    </a>
                    <div class="absolute left-0 mt-2 w-48 rounded-md shadow-lg bg-dark-blue/95 backdrop-blur-sm opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50">
                        <div class="py-1">
                            <a href="/?t1=46&t2=47" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">现代都市</a>
                            <a href="/?t1=46&t2=48" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">脑洞悬疑</a>
                            <a href="/?t1=46&t2=49" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">年代穿越</a>
                            <a href="/?t1=46&t2=50" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">古装仙侠</a>
                            <a href="/?t1=46&t2=51" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">反转爽剧</a>
                            <a href="/?t1=46&t2=52" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">女频恋爱</a>
                            <a href="/?t1=46&t2=53" class="block px-4 py-2 text-sm text-gray-light hover:bg-primary/20 hover:text-white">成长逆袭</a>
                        </div>
                    </div>
                </div>
            </nav>

            <!-- 搜索框 -->
            <!-- 搜索框（修改为表单形式） -->
            <form action="/search" method="get" class="relative flex-grow max-w-md mx-4">
                <input type="text" name="keyword" placeholder="搜索电影、电视剧、纪录片..."
                       class="w-full py-2 pl-4 pr-10 rounded-full bg-gray-dark/50 border border-gray-medium/30 focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary text-white placeholder-gray-light/70">
                <button type="submit" class="absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-light hover:text-white transition-colors">
                    <i class="fa fa-search"></i>
                </button>
            </form>

            <!-- 移动端菜单按钮 -->
            <button class="md:hidden text-white" id="mobile-menu-button">
                <i class="fa fa-bars text-xl"></i>
            </button>
        </div>

        <!-- 移动端导航菜单 -->
        <div class="md:hidden bg-dark-blue/95 backdrop-blur-md absolute w-full left-0 top-full shadow-lg transform -translate-y-full opacity-0 invisible transition-all duration-300" id="mobile-menu">
            <div class="container mx-auto px-4 py-3">
                <nav class="flex flex-col space-y-3">
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors py-2 border-b border-gray-dark/30">首页</a>
                    <div class="relative group">
                        <button class="text-white font-medium hover:text-primary transition-colors flex items-center justify-between w-full py-2 border-b border-gray-dark/30">
                            电影 <i class="fa fa-angle-down ml-1 transition-transform group-hover:rotate-180"></i>
                        </button>
                        <div class="pl-4 space-y-2 py-2 bg-gray-dark/20 rounded-lg mt-1 opacity-0 h-0 overflow-hidden group-hover:opacity-100 group-hover:h-auto transition-all duration-300">
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">动作片</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">喜剧</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">爱情</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">科幻</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">恐怖</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">剧情</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">战争</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">记录片</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">伦理</a>
                        </div>
                    </div>
                    <div class="relative group">
                        <button class="text-white font-medium hover:text-primary transition-colors flex items-center justify-between w-full py-2 border-b border-gray-dark/30">
                            连续剧 <i class="fa fa-angle-down ml-1 transition-transform group-hover:rotate-180"></i>
                        </button>
                        <div class="pl-4 space-y-2 py-2 bg-gray-dark/20 rounded-lg mt-1 opacity-0 h-0 overflow-hidden group-hover:opacity-100 group-hover:h-auto transition-all duration-300">
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">国产剧</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">韩剧</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">美剧</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">泰剧</a>
                            <a href="#" class="block py-1 text-sm text-gray-light hover:text-white">港剧</a>
                        </div>
                    </div>
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors py-2 border-b border-gray-dark/30">动漫</a>
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors py-2 border-b border-gray-dark/30">综艺</a>
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors py-2 border-b border-gray-dark/30">体育</a>
                    <a href="#" class="text-white font-medium hover:text-primary transition-colors py-2 border-b border-gray-dark/30">综艺解说</a>
                </nav>
            </div>
        </div>
    </header>





{% block main %}

{% block banner_script %}{% endblock banner_script %}

{% endblock main %}
    <!-- 页脚 -->
    <footer class="bg-dark pt-12 pb-6">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8">
                <div>
                    <div class="flex items-center space-x-2 mb-4">
                        <div class="w-10 h-10 rounded-lg bg-primary flex items-center justify-center">
                            <i class="fa fa-film text-2xl text-white"></i>
                        </div>
                        <span class="text-xl font-bold text-white">影视天堂</span>
                    </div>
                    <p class="text-gray-medium mb-4">
                        提供高质量的影视资源，让您随时随地享受精彩内容。
                    </p>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-light hover:text-primary transition-colors">
                            <i class="fa fa-facebook"></i>
                        </a>
                        <a href="#" class="text-gray-light hover:text-primary transition-colors">
                            <i class="fa fa-twitter"></i>
                        </a>
                        <a href="#" class="text-gray-light hover:text-primary transition-colors">
                            <i class="fa fa-instagram"></i>
                        </a>
                        <a href="#" class="text-gray-light hover:text-primary transition-colors">
                            <i class="fa fa-youtube-play"></i>
                        </a>
                    </div>
                </div>

                <div>
                    <h3 class="text-lg font-semibold text-white mb-4">快速链接</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">首页</a></li>
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">电影</a></li>
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">连续剧</a></li>
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">动漫</a></li>
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">综艺</a></li>
                    </ul></ul>
                </div>

                <div>
                    <h3 class="text-lg font-semibold text-white mb-4">支持</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">帮助中心</a></li>
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">联系我们</a></li>
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">隐私政策</a></li>
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">使用条款</a></li>
                        <li><a href="#" class="text-gray-medium hover:text-primary transition-colors">常见问题</a></li>
                    </ul>
                </div>

            </div>

            <div class="border-t border-gray-dark/50 pt-6 flex flex-col md:flex-row justify-between items-center">
                <p class="text-gray-medium text-sm mb-4 md:mb-0">
                    &copy; 2023 影视天堂. 保留所有权利.
                </p>
                <div class="flex space-x-4">
                    <a href="#" class="text-gray-medium hover:text-primary transition-colors text-sm">隐私政策</a>
                    <a href="#" class="text-gray-medium hover:text-primary transition-colors text-sm">使用条款</a>
                    <a href="#" class="text-gray-medium hover:text-primary transition-colors text-sm">Cookie 设置</a>
                </div>
            </div>
        </div>
    </footer>

{% block end_script %}{% endblock end_script %}

</body>
</html>
